package xyz.ddlnt.model.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author ZZULI_SE 210910
 * @data 2025/4/26 22:55
 */
@Schema(description = "试题信息表")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ExamQuestion implements Serializable {
    @Serial  // TODO 序列化版本号
    private static final long serialVersionUID = 569116575996179115L;

    @Schema(description = "试题 id")
    private Long id;
    @Schema(description = "类别 id")
    private Long categoryId;
    @Schema(description = "技术 id")
    private Long technologyId;
    @Schema(description = "试题标题")
    private String questionTitle;
    @Schema(description = "试题目录")
    private String examQuesDir; // JSON 类型
    @Schema(description = "试题内容")
    private String questionContent;

    @Schema(description = "标签")
    private String tags;
    @Schema(description = "试题难度：0 简单、1 中等、2 困难")
    private Integer examQuesDifficulty;

    @Schema(description = "用户id（试题来源：0 官方、来源为用户则是用户ID）")
    private Long userId;
    @Schema(description = "帖子的子节点（帖子id数组）")
    private String childNodes; // JSON 类型

    @Schema(description = "浏览人数")
    private Integer viewCount;
    @Schema(description = "点赞数")
    private Integer likeCount;
    @Schema(description = "收藏数")
    private Integer collectCount;
//    @Schema(description = "评论数")
//    private Integer commentCount;

    @Schema(description = "是否发布（0 否、1 是）")
    private Integer publishStatus;
    @Schema(description = "发布时间")
    private LocalDateTime publishTime;
    @Schema(description = "修改时间")
    private LocalDateTime updateTime;
}
